package org.blogwu.learn.designpattern.chapter11.v1;

/**
 * 此类局限性：每中格式要创建对应代码，如果我想要2个鸡蛋和两个想场，那么还要写一个，
 * 但是是可以算出来的。
 *
 * @author hyf
 * @date 2018-10-27
 **/
public class Main {
    public static void main(String[] args) {
        {
            Battercake battercake = new Battercake();
            System.out.println(battercake.getDesc() + " 销售价格：" + battercake.cost());
        }
        {
            Battercake battercake = new BattercakeWithEgg();
            System.out.println(battercake.getDesc() + " 销售价格：" + battercake.cost());
        }
        {
            Battercake battercake = new BattercakeWithEggSausage();
            System.out.println(battercake.getDesc() + " 销售价格：" + battercake.cost());
        }
    }
}
